<?php
use Workerman\Worker;
use Workerman\Lib\Timer;

require_once __DIR__."/../Autoloader.php";

$work = new Worker("http://0.0.0.0:1234");
#4个进程
$work->count=4;
$work->onWorkerStart=function($work){
    echo "work->id={$work->id}\n";
};

$work2 = new Worker("tcp://0.0.0.0:2345");
$work->onConnect=function($work2){
    echo "work->id={$work2->id}\n";
};


Worker::runAll();